<?php

/*
	Class: BlogMedia

	About: Author
		Rich Joslin

	About: License
		<http://communit.as/docs/license>
*/
class BlogMedia extends Blog_Db_Table {
	protected $_name = 'blog_media';
	protected $_primary = 'id';       

	function activate($id) {
		$where = $this->getAdapter()->quoteInto("id = ?", $id);
		$this->update(array('active' => "1"), $where);
	}

	function deactviate($id) {
		$where = $this->getAdapter()->quoteInto("id = ?", $id);
		$this->update(array('active' => "0"), $where);
	}

	function deactivateAll($post_id) {
		$where = $this->getAdapter()->quoteInto("post_id = ?", $post_id);
		$this->update(array('active' => "0"),$where);
	}

}
